FROM debian:buster

# TCP
EXPOSE 11001

# 安装 D语言编译器
RUN apt update && apt upgrade -y && \
    apt install -y libssl-dev wget libc6-dev libcurl4 gcc telnet

RUN wget https://downloads.dlang.org/releases/2019/dmd_2.088.1-0_amd64.deb && \
    dpkg -i dmd_2.088.1-0_amd64.deb

# 设置工作目录
WORKDIR /app

COPY . .

RUN dub build -v

VOLUME /etc/privchat
WORKDIR /etc/privchat
